package com.vchello.bean.user;

import java.io.Serializable;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.vchello.bean.lib.Area;

/**
 * 
 * @author power
 * 用户领域
 */
@TableName("user_area")
public class UserArea extends Model<UserArea> {

	private static final long serialVersionUID = 1L;

	@TableId("id")
	private int id;
	
	@TableField("area_id")
	private int areaId;

	@TableField("sort")
	private int sort;

	@TableField("user_id")
	private int userId;

	@TableField(exist = false)
	private Area area;

	@TableField(exist = false)
	private User user;

	public UserArea() {
		super();
	}

	public UserArea(int areaId, int sort, int userId) {
		super();
		this.areaId = areaId;
		this.sort = sort;
		this.userId = userId;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getAreaId() {
		return areaId;
	}

	public void setAreaId(int areaId) {
		this.areaId = areaId;
	}

	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}